package com.zhentao.api.schedule.fallback;

import com.zhentao.api.schedule.ScheduleClientApi;
import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.model.common.enums.AppHttpCodeEnum;
import com.zhentao.model.schedule.dto.TaskDto;
import org.springframework.stereotype.Component;

//feign请求失败的配置
@Component
public class ScheduleClientApiFallback implements ScheduleClientApi {

    @Override
    public ResponseResult addTask(TaskDto taskDto) {
        return ResponseResult.errorResult(AppHttpCodeEnum.SERVER_ERROR,"获取数据失败");
    }

    @Override
    public ResponseResult poll(int type, int priority) {
        return ResponseResult.errorResult(AppHttpCodeEnum.SERVER_ERROR,"获取数据失败");
    }

}
